package demo1;

public class demo3 {
    public static void main(String[] args) throws InterruptedException {
        Thread t = new Thread() {
            @Override
            public void run() {
                while (true) {
                    System.out.println("t线程");
                }
            }
        };
        t.start();
        while (true) {
            System.out.println("主线程");
        }
    }

}
